// Decompiled by Jad v1.5.7g. Copyright 2000 Pavel Kouznetsov.
// Jad home page: http://www.geocities.com/SiliconValley/Bridge/8617/jad.html
// Decompiler options: packimports(3) fieldsfirst ansi 
// Source File Name:   SQLDBConnection.java

package cn.org.zx.db.dbconnection.impl;

import java.sql.*;
import cn.org.zx.db.dbexception.DBErrorException;

public class OracleDBConnection extends DefaultDBConnection
{
    public OracleDBConnection()
    {
    }
    @Override
    public void openbyJDBC(String url, String username, String password) throws DBErrorException
    {
        try    
        { 
        	Class.forName("oracle.jdbc.driver.OracleDriver");
            connection = DriverManager.getConnection(url, username, password);
            stmt = connection.createStatement();
        }
        catch(ClassNotFoundException e)
        {
            e.printStackTrace();
            throw new DBErrorException("JDBC驱动[oracle.jdbc.driver.OracleDriver]未发现");
        }
        catch(SQLException e)
        {
            e.printStackTrace();
            throw new DBErrorException("JDBC连接失败，[url:" + url + ",user:" + username + "，password:" + password);
        }
    }
   
    public static void main(String args[])
    {
        
    }
}
